#include <iostream>
#include <stdint.h>
using namespace std;
int main() {
  int x = 1, y = 123;
  // 尝试注释下地址的输出，结果就不同
  cout << (uint64_t)&x << endl;
  cout << (uint64_t)&y << endl;
  uint64_t addr = (uint64_t)&x;
  // macOS 需要 addr - 4，不同操作系统下，内存分配地址的顺序不同
  cout << *(int*)(addr + 4) << endl;
  int* ptr = &x;
  cout << *(ptr + 1/* * sizeof(int) */) << endl;
  cout << ptr[1] << endl;
}